A solid state imaging device in which a microlens array is configured via air gaps of several tens of micrometers (μm) on a sensor substrate having a plurality of pixels formed on an upper face is required to have a high degree of parallelism between the sensor substrate and the microlens array.
Accordingly, in general, the microlens array is formed directly on the upper face of the sensor substrate. This maintains parallelism between the pixels and the micro lenses.
Meanwhile, in a solid state imaging device intended to detect a distance between the solid state imaging device and a subject, a microlens array is arranged apart from a sensor substrate with pixels formed. However, if there arise variations of about several tens of micrometers (μm) in a gap between the sensor substrate and the microlens array in a plane parallel to the upper face of the sensor substrate, a light axis of an imaging lens and the microlenses are shifted from each other, thereby resulting in degradation of image quality. In addition, lights having passed through adjacent microlenses and having been condensed enter into the pixels to cause light color mixture and reduce the accuracy of matching among images with parallaxes.
In addition, an imaging surface of an object on a plane perpendicular to the light axis is not necessarily a plane perpendicular to the light axis, but is a curved surface generally. This phenomenon is referred to as a field curvature aberration, the position of the image of a peripheral vision is shifted and an image quality of a peripheral vision is degraded.